<template>
  <div class="pay-info-list">
    <div class="total-pay">支出:￥{{totalPay}}</div>
    <div :key="item.id" v-for="item in infoList" class="list-item">
      <div class="left">
        <van-image class="pic" round width="14vw" height="14vw" :src="item.pic" />
        <div class="type">
          <span>{{ item.type }}</span>
          <span>{{ item.time }}</span>
        </div>
      </div>
      <div class="right">
        -{{ item.amount }}
      </div>
    </div>
  </div>
</template>

<script lang="js">
import {defineComponent, reactive, ref} from 'vue'

export default defineComponent({
  props: {
    infoList:{
      type:Array,
      default(){
        return []
      }
    },
    totalPay:{
      type:Number,
      default:0
    }
  },
  components: {

  },
  setup() {


    return {

    }

  }
})
</script>

<style scoped lang="less">
.pay-info-list{
  padding:0 6vw 6vw 6vw;
  .total-pay{
    color: #8c8c8c;
    font-size: 3.8vw;
    margin-bottom: 3.2vw;
  }
  .list-item{
    display: flex;
    // align-items: center;
    justify-content: space-between;
    padding: 2vh 0;
    border-bottom: 1px solid var(--van-white-color4);
    .left{
      display: flex;
      align-items: center;
      .pic{
        margin-right: 4.8vw;
      }
      .type{
        display: flex;
        flex-direction: column;
        span{
          padding: 1vw 0;
        }
        span:nth-child(2){
          color: var(--van-white-color6);
          font-size: 3.8vw;
        }
      }
    }

    .right{
      padding-top: 1vw;
    }
  }
}
</style>
